package com.csun.dsms.controller;

import com.csun.dsms.comment.core.utils.wrapper.WrapMapper;
import com.csun.dsms.comment.core.utils.wrapper.Wrapper;
import com.csun.dsms.mapper.DsmsProjectClassMapper;
import com.csun.dsms.model.domain.DsmsProjectClass;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-01 11:53
 * @description: TODO
 */
@RestController
@RequestMapping("/project/class")
public class DsmsProjectClassController {

    @Resource
    private DsmsProjectClassMapper dsmsProjectClassMapper;

    @RequestMapping("/query")
    public Wrapper projectClassQuery(){
        List<DsmsProjectClass> dsmsProjectClasses = dsmsProjectClassMapper.selectAll();
        return WrapMapper.wrap(Wrapper.SUCCESS_CODE,Wrapper.SUCCESS_MESSAGE,new PageInfo<>(dsmsProjectClasses));
    }

}
